﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:jSLCore.Client.Presentation.Controls" xmlns:Validation="clr-namespace:jSLCore.Client.Presentation.BaseControl.Validation">
<Style TargetType="Button">
        <Setter Property="Margin" Value="5"/>
        <Setter Property="Padding" Value="2,1"/>
    </Style>
    
    <Style TargetType="Controls:HyperlinkButton">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Foreground" Value="Blue"/>
        <Setter Property="TextDecorations" Value="Underline"/>
    </Style>
    
    <!--<Style TargetType="FrameworkElement">
        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
            
            </Setter.Value>
        </Setter>
    </Style>-->

    <ControlTemplate x:Key="errorTemplate">
        <DockPanel LastChildFill="True" ClipToBounds="False" SnapsToDevicePixels="False">
            <DockPanel.ToolTip>
                <Binding ElementName="abornerPlaceholder"
                Path="AdornedElement.(Validation.Errors)[0].ErrorContent"/>
            </DockPanel.ToolTip>
            <!--<Image DockPanel.Dock="Right" Source="jSLCore.Client.Presentation.Wpf;component/Resources/Error.png" Width="12" Height="12" Margin="4,0,0,0" VerticalAlignment="Top" />-->
            <TextBlock DockPanel.Dock="Right" FontSize="14" Foreground="Red" FontWeight="Bold"  Text="!" Margin="4,0,0,0" VerticalAlignment="Center" >                
                    <TextBlock.ToolTip>
                    <Binding ElementName="abornerPlaceholder"
                    Path="AdornedElement.(Validation.Errors)[0].ErrorContent"/>
                        </TextBlock.ToolTip>
            </TextBlock>
            <Border 
                BorderBrush="Red" 
                BorderThickness="1" 
                CornerRadius="2" 
                Padding="1"
                SnapsToDevicePixels="True" 
                Margin="-1">
                <AdornedElementPlaceholder Name="abornerPlaceholder">
                </AdornedElementPlaceholder>
            </Border>
        </DockPanel>
    </ControlTemplate>
</ResourceDictionary>